package com.zucai365.football.service.impl;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.wcj.common.service.impl.WcjServiceImpl;
import com.zucai365.football.bean.LianSaiBean;
import com.zucai365.football.dao.LianSaiDao;
import com.zucai365.football.service.LianSaiService;

@Service("lianSaiService")
public class LianSaiServiceImpl extends WcjServiceImpl<LianSaiBean> implements LianSaiService{
	
	@Autowired
	@Qualifier("lianSaiDao")
	private LianSaiDao lianSaiDao;

	public LianSaiDao getLianSaiDao() {
		return lianSaiDao;
	}

	public void setLianSaiDao( LianSaiDao lianSaiDao ) {
		this.lianSaiDao = lianSaiDao;
	}

	@Override
	public List<LianSaiBean> getAllLianSai() {
		
		DetachedCriteria criteria = DetachedCriteria.forClass( LianSaiBean.class, "lianSai" );
		criteria.addOrder( Order.asc( "viewOrder" ) );
		return this.lianSaiDao.findByCriteria(criteria);
		
	}
	
}
